import { Checkbox } from 'antd';

export default function AxCheckbox(props) {
  const { children, defaultChecked = false, record, handleChange } = props;

  return (
    <Checkbox
      defaultChecked={defaultChecked}
      onChange={obj => {
        if (handleChange) {
          handleChange(obj, record);
        }
      }}
    >
      {children}
    </Checkbox>
  );
}
